<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
        <title>我的订单</title>
        <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
        <meta content="yes" name="apple-mobile-web-app-capable">
        <meta content="black" name="apple-mobile-web-app-status-bar-style">
        <meta content="telephone=no" name="format-detection">
        <link href="/css/shop/style.css" rel="stylesheet" type="text/css">
        <script type="text/javascript" src="/js/shop/jquery.min.js"></script>
        <script src="/js/plugins/jrender/jrender.min.js"></script>
        <script type="text/javascript" src="/js/shop/tab.js"></script>
        <script>
             $(function () {
                 var user = JSON.parse(window.sessionStorage.getItem("user"));
                 var userId = user.id;
                 $.get('/orders',{userId:userId},function (data) {
                     $('.all').renderValues({list:data},{
                         setTitle:function (item, value) {
                             var name = $(item).html();
                             $(item).html('骡窝'+ name +'自营店');
                         },
                         setPrice:function (item, value) {
                             var count = $(item).prev().html();
                             $(item).html(count*value);
                         },
                         setHref: function (item, value) {
                             var href = $(item).data('href') + value;
                             $(item).attr('href', href);
                         }
                     });
                 });
                 $.get('/orders',{userId:userId,state:0},function (data) {
                     $('.waiting').renderValues({list:data},{
                         setTitle:function (item, value) {
                             var name = $(item).html();
                             $(item).html('骡窝'+ name +'自营店');
                         },
                         setPrice:function (item, value) {
                             var count = $(item).prev().html();
                             $(item).html(count*value);
                         },
                         setHref: function (item, value) {
                             var href = $(item).data('href') + value;
                             $(item).attr('href', href);
                         }
                     });
                 });
                 $.get('/orders',{userId:userId,state:1},function (data) {
                     $('.sending').renderValues({list:data},{
                         setTitle:function (item, value) {
                             var name = $(item).html();
                             $(item).html('骡窝'+ name +'自营店');
                         },
                         setPrice:function (item, value) {
                             var count = $(item).prev().html();
                             $(item).html(count*value);
                         },
                         setHref: function (item, value) {
                             var href = $(item).data('href') + value;
                             $(item).attr('href', href);
                         }
                     });
                 });
                 $.get('/orders',{userId:userId,state:2},function (data) {
                     $('.arrive').renderValues({list:data},{
                         setTitle:function (item, value) {
                             var name = $(item).html();
                             $(item).html('骡窝'+ name +'自营店');
                         },
                         setPrice:function (item, value) {
                             var count = $(item).prev().html();
                             $(item).html(count*value);
                         },
                         setHref: function (item, value) {
                             var href = $(item).data('href') + value;
                             $(item).attr('href', href);
                         }
                     });
                 });
                 $.get('/orders',{userId:userId,state:3},function (data) {
                     $('.refund').renderValues({list:data},{
                         setTitle:function (item, value) {
                             var name = $(item).html();
                             $(item).html('骡窝'+ name +'自营店');
                         },
                         setPrice:function (item, value) {
                             var count = $(item).prev().html();
                             $(item).html(count*value);
                         },
                         setHref: function (item, value) {
                             var href = $(item).data('href') + value;
                             $(item).attr('href', href);
                         }
                     });
                 });
             });
        </script>
    </head>
    <body>
        <section class="aui-flexView">
            <header class="aui-navBar aui-navBar-fixed">
                <a href="javascript:window.history.go(-1);" class="aui-navBar-item">
                    <i class="icon icon-return"></i>
                </a>
                <div class="aui-center">
                    <span class="aui-center-title">我的订单</span>
                </div>
                <a href="javascript:;" class="aui-navBar-item">
                    <i class="icon icon-sys"></i>
                </a>
            </header>
            <section class="aui-scrollView">
                <div class="aui-tab" data-ydui-tab="">
                    <ul class="tab-nav">
                        <li class="tab-nav-item tab-active">
                            <a href="javascript:;">全部</a>
                        </li>
                        <li class="tab-nav-item">
                            <a href="javascript:;">待发货</a>
                        </li>
                        <li class="tab-nav-item">
                            <a href="javascript:;">已发货</a>
                        </li>
                        <li class="tab-nav-item">
                            <a href="javascript:;">已收货</a>
                        </li>
                        <li class="tab-nav-item">
                            <a href="javascript:;">售后</a>
                        </li>
                    </ul>
                    <div class="divHeight"></div>
                    <div class="tab-panel">
                        <div class="all">
                        <!--全部-->
                        <div class="tab-panel-item tab-active" render-loop="list">
                            <div class="tab-item">
                                <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                    <div class="aui-well-item-hd">
                                        <img src="/img/shop/icon-logo.png" alt="">
                                    </div>
                                    <div class="aui-well-item-bd">
                                        <h3  render-fun="setTitle" render-key="list.item.name"></h3>
                                    </div>
                                    <span class="aui-well-item-fr" render-html="list.stateDispaly">已取消</span>
                                </a>
                                <div class="aui-mail-product">
                                    <a href="javascript:;" class="aui-mail-product-item">
                                        <div class="aui-mail-product-item-hd">
                                            <img render-src="list.item.imageUrl" alt="">
                                        </div>
                                        <div class="aui-mail-product-item-bd">
                                            <p render-html="list.itemparams"></p>
                                            <p render-html="list.item.description"></p>
                                        </div>
                                    </a>
                                </div>
                                <a href="javascript:;" class="aui-mail-payment">
                                    <p>
                                        共<em render-html="list.count"></em>
                                        件商品 实付款: <i render-fun="setPrice" render-key="list.price" style="color:red"></i>积分
                                    </p>
                                </a>
                                <div class="aui-mail-button">
                                    <a data-href="/mine/itemdetail.html?id=" render-fun="setHref" render-key="list.item.id">再次购买</a>
                                    <a href="javascript:;" class="aui-df-color">评价晒单</a>
                                    <a href="javascript:;" class="aui-df-color">查看发票</a>
                                </div>
                                <div class="divHeight"></div>
                            </div>

                        </div>
                        </div>

                        <div class="waiting">
                            <!--待发货-->
                            <div class="tab-panel-item tab-active" render-loop="list">
                                <div class="tab-item">
                                    <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                        <div class="aui-well-item-hd">
                                            <img src="/img/shop/icon-logo.png" alt="">
                                        </div>
                                        <div class="aui-well-item-bd">
                                            <h3  render-fun="setTitle" render-key="list.item.name"></h3>
                                        </div>
                                        <span class="aui-well-item-fr" render-html="list.stateDispaly">已取消</span>
                                    </a>
                                    <div class="aui-mail-product">
                                        <a href="javascript:;" class="aui-mail-product-item">
                                            <div class="aui-mail-product-item-hd">
                                                <img render-src="list.item.imageUrl" alt="">
                                            </div>
                                            <div class="aui-mail-product-item-bd">
                                                <p render-html="list.itemparams"></p>
                                                <p render-html="list.item.description"></p>
                                            </div>
                                        </a>
                                    </div>
                                    <a href="javascript:;" class="aui-mail-payment">
                                        <p>
                                            共<em render-html="list.count"></em>
                                            件商品 实付款: <i render-fun="setPrice" render-key="list.price" style="color:red"></i>积分
                                        </p>
                                    </a>
                                    <div class="aui-mail-button">
                                        <a href="#">再次购买</a>
                                        <a href="javascript:;" class="aui-df-color">评价晒单</a>
                                        <a href="javascript:;" class="aui-df-color">查看发票</a>
                                    </div>
                                    <div class="divHeight"></div>
                                </div>

                            </div>
                        </div>
                        <div class="sending">
                            <!--已发货-->
                            <div class="tab-panel-item tab-active" render-loop="list">
                                <div class="tab-item">
                                    <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                        <div class="aui-well-item-hd">
                                            <img src="/img/shop/icon-logo.png" alt="">
                                        </div>
                                        <div class="aui-well-item-bd">
                                            <h3  render-fun="setTitle" render-key="list.item.name"></h3>
                                        </div>
                                        <span class="aui-well-item-fr" render-html="list.stateDispaly">已取消</span>
                                    </a>
                                    <div class="aui-mail-product">
                                        <a href="javascript:;" class="aui-mail-product-item">
                                            <div class="aui-mail-product-item-hd">
                                                <img render-src="list.item.imageUrl" alt="">
                                            </div>
                                            <div class="aui-mail-product-item-bd">
                                                <p render-html="list.itemparams"></p>
                                                <p render-html="list.item.description"></p>
                                            </div>
                                        </a>
                                    </div>
                                    <a href="javascript:;" class="aui-mail-payment">
                                        <p>
                                            共<em render-html="list.count"></em>
                                            件商品 实付款: <i render-fun="setPrice" render-key="list.price" style="color:red"></i>积分
                                        </p>
                                    </a>
                                    <div class="aui-mail-button">
                                        <a href="#">再次购买</a>
                                        <a href="javascript:;" class="aui-df-color">评价晒单</a>
                                        <a href="javascript:;" class="aui-df-color">查看发票</a>
                                    </div>
                                    <div class="divHeight"></div>
                                </div>

                            </div>
                        </div>
                        <div class="arrive">
                            <!--已收货-->
                            <div class="tab-panel-item tab-active" render-loop="list">
                                <div class="tab-item">
                                    <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                        <div class="aui-well-item-hd">
                                            <img src="/img/shop/icon-logo.png" alt="">
                                        </div>
                                        <div class="aui-well-item-bd">
                                            <h3  render-fun="setTitle" render-key="list.item.name"></h3>
                                        </div>
                                        <span class="aui-well-item-fr" render-html="list.stateDispaly">已取消</span>
                                    </a>
                                    <div class="aui-mail-product">
                                        <a href="javascript:;" class="aui-mail-product-item">
                                            <div class="aui-mail-product-item-hd">
                                                <img render-src="list.item.imageUrl" alt="">
                                            </div>
                                            <div class="aui-mail-product-item-bd">
                                                <p render-html="list.itemparams"></p>
                                                <p render-html="list.item.description"></p>
                                            </div>
                                        </a>
                                    </div>
                                    <a href="javascript:;" class="aui-mail-payment">
                                        <p>
                                            共<em render-html="list.count"></em>
                                            件商品 实付款: <i render-fun="setPrice" render-key="list.price" style="color:red"></i>积分
                                        </p>
                                    </a>
                                    <div class="aui-mail-button">
                                        <a href="#">再次购买</a>
                                        <a href="javascript:;" class="aui-df-color">评价晒单</a>
                                        <a href="javascript:;" class="aui-df-color">查看发票</a>
                                    </div>
                                    <div class="divHeight"></div>
                                </div>

                            </div>
                        </div>
                        <div class="refund">
                            <!--已收货-->
                            <div class="tab-panel-item tab-active" render-loop="list">
                                <div class="tab-item">
                                    <a href="javascript:void(0);" class="aui-well-item aui-well-item-clear">
                                        <div class="aui-well-item-hd">
                                            <img src="/img/shop/icon-logo.png" alt="">
                                        </div>
                                        <div class="aui-well-item-bd">
                                            <h3  render-fun="setTitle" render-key="list.item.name"></h3>
                                        </div>
                                        <span class="aui-well-item-fr" render-html="list.stateDispaly">已取消</span>
                                    </a>
                                    <div class="aui-mail-product">
                                        <a href="javascript:;" class="aui-mail-product-item">
                                            <div class="aui-mail-product-item-hd">
                                                <img render-src="list.item.imageUrl" alt="">
                                            </div>
                                            <div class="aui-mail-product-item-bd">
                                                <p render-html="list.itemparams"></p>
                                                <p render-html="list.item.description"></p>
                                            </div>
                                        </a>
                                    </div>
                                    <a href="javascript:;" class="aui-mail-payment">
                                        <p>
                                            共<em render-html="list.count"></em>
                                            件商品 实付款: <i render-fun="setPrice" render-key="list.price" style="color:red"></i>积分
                                        </p>
                                    </a>
                                    <div class="aui-mail-button">
                                        <a href="#">再次购买</a>
                                        <a href="javascript:;" class="aui-df-color">评价晒单</a>
                                        <a href="javascript:;" class="aui-df-color">查看发票</a>
                                    </div>
                                    <div class="divHeight"></div>
                                </div>

                            </div>
                        </div>

                    </div>
                </div>
            </section>
        </section>
    

</body></html>